import request from '@/utils/request'
// 获取初始表单数据
/**
 * 获取点位list
 * @param {*} data
 */
export const getList = (params) => {
  return request({
    url: '/vm-service/node/search',
    method: 'GET',
    params
  })
}
/**
 * 搜索点位
 * @param {*} data
 */
export const searchList = (params) => {
  return request({
    url: '/vm-service/node/search',
    method: 'GET',
    params
  })
}
/**
 * 新增点位
 * @param {*} data
 */
export const addPointList = (data) => {
  return request({
    url: '/vm-service/node',
    method: 'POST',
    data
  })
}
/**
 * 编辑的点位
 * @param {*} id
 */
export const editStreet = (id, data) => {
  return request({
    url: `/vm-service/node/${id}`,
    method: 'PUT',
    data

  })
}
/**
 * 点位详情
 * @param {*} id
 */
export const details = (id) => {
  return request({
    url: `/vm-service/node/vmList/${id}`,
    method: 'GET'
  })
}
/**
 * 删除点位
 * @param {*} id
 */
export const del = (id) => {
  return request({
    url: `/vm-service/node/${id}`,
    method: 'DELETE'
  })
}
/**
 * 商圈类型
 */
export const businessType = () => {
  return request({
    url: `/vm-service/businessType`,
    method: 'GET'
  })
}
/**
 * 合作商选择
 */
export const partner = () => {
  return request({
    url: `/user-service/partner/search`,
    method: 'GET',
    params: {
      pageIndex: 1,
      pageSize: 100000

    }
  })
}
/**
 * 所属区域
 */
export const area = () => {
  return request({
    url: `/vm-service/region/search`,
    method: 'GET'
  })
}
